package cn.wjh.business.controller;

import cn.wjh.business.domain.vo.MailVo;
import cn.wjh.business.service.IMyCenterService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 个人中心
 */
@RestController
@RequestMapping("/business/myCenter")
@Slf4j
public class MyCenterController extends BaseController {
	@Resource
	private IMyCenterService myCenterService;

	/**
	 * 绑定邮箱
	 */
	@PutMapping("/bindMail")
	public AjaxResult bindMail(@RequestBody MailVo mailVo) {
		return toAjax(myCenterService.bindMail(mailVo));
	}


	/**
	 * 获取用户信息(登录后调用这个接口获取用户详细信息)
	 */
	@GetMapping("getInfo")
	public AjaxResult getInfo() {
		return myCenterService.getInfo();
	}


}
